package com.lmx.persistence.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lmx.common.context.ActionContextHolder;
import com.lmx.persistence.service.common.BaseCrudServiceImpl;
import com.lmx.repoDomain.tmodel.AssessmentIndicator;

/**
 * 员工考核业务方向
 *
 * @author ytche
 * @date 2017年7月10日
 *
 */
@Service(value = "assessmentIndicatorService")
public class AssessmentIndicatorServiceImpl extends BaseCrudServiceImpl<AssessmentIndicator>
		implements AssessmentIndicatorService {
	@Autowired
	TempAssessmentIndicatorsService tempService;

	@Override
	public Iterable<AssessmentIndicator> findForTempAssessment(Integer assessmentDate) {
		List<AssessmentIndicator> list = tempService.findForTempAssessment(assessmentDate);
		if (list == null || list.size() < 1) {
			return super.findNotDelete("tenant.id", ActionContextHolder.getContext().getTenantId());
		}
		return list;
	}
}
